import axios from '@/utils/axios'
import moment from "moment";
import request from "../service/request";
import { ElMessage } from 'element-plus'


export function getDeptTree(params) {
  return axios({
    url: '/ReportCenter/list',
    method: 'post',
    data: params
  })
}


export function getDeptTreeOne(params) {
  return axios({
    url: '/ReportCenter/one',
    method: 'post',
    data: params
  })
}

export function getDeptPerformance(params) {
  return axios({
    url: '/ReportCenter/deptPerformanceEcharts',
    method: 'post',
    data: params
  })
}


export function getRegionalDistribution1(params) {
  return axios({
    url: '/ReportCenter/regionalDistribution1',
    method: 'post',
    data: params
  })
}

export function getRegionalDistribution2(params) {
  return axios({
    url: '/ReportCenter/regionalDistribution2',
    method: 'post',
    data: params
  })
}


export const getAllDept = async (deptId) => {
    const data = await request.get(`/auth/dept/all`);
    return data.data
}